package com.hue.concurrent.day01;

/*
    yield方法会把当前线程从running变为runnable状态
 */
public class Demo07 {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
//            Thread.yield();
            System.out.println("t1执行");
        });
        t1.start();
        Thread.yield();
        System.out.println("main执行");
    }
}
